#include "Vertex.hpp"
#include <cmath>


double	Vertex::getDistanceBetween(const Vertex& in1, const Vertex& in2)
{
	double 	dist_end = 0.;
	int		dist_d = 0;
	
	dist_end = sqrt(pow(in2.veX - in1.veX, 2.) + pow(in2.veY - in1.veY, 2.));
    //std::cout << dist_end << std::endl;
	dist_end *= 100.;
	dist_d = (int)floor(dist_end);
	dist_end = dist_d * 0.01;
    
	return (dist_end);
}


/*
double	Vertex::getDistanceBetween(const Vertex& in1, const Vertex& in2)
{
	double 	dist_end = 0.;
	int		dist_d = 0;
	
	dist_end = sqrt(pow(in2.veX - in1.veX, 2.) + pow(in2.veY - in1.veY, 2.));
    
	return (dist_end);
}
*/

Vertex::Vertex(unsigned inId, double inX, double inY)
	: veId(inId), veX(inX), veY(inY)
{
	vePred = veSucc = 0;	
}


